package com.tianhui.consignortwofei.mvp.ui.activity.audit.driver;

import android.view.View;
import android.widget.Toast;

import com.fgs.common.CommonFragment;
import com.fgs.common.CommonPresenter;
import com.fgs.common.CommonView;
import com.fgs.common.entity.PictureInfo;
import com.tianhui.consignortwofei.R;
import com.tianhui.consignortwofei.manager.EventBusManage;
import com.tianhui.consignortwofei.mvp.model.enty.DriverInfo;
import com.xuexiang.xui.widget.edittext.ClearEditText;
import com.xuexiang.xui.widget.edittext.MultiLineEditText;

import butterknife.BindView;

/**
 * @author fgs
 * @date 2021/6/11
 * @description
 **/
public class ChangePhoneActivity extends BaseDriverAuditActivity {

    @BindView(R.id.activity_driver_remark_remarkEditText)
    MultiLineEditText remarkEditText;

    @BindView(R.id.clet_old_phone_num)
    ClearEditText clet_old_phone_num;

    @BindView(R.id.clet_new_phone_num)
    ClearEditText clet_new_phone_num;

    @Override
    public String getToolbarTitle() {
        return "修改手机号";
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_driver_chang_phone;
    }

    @Override
    public CommonPresenter createPresenter() {
        return null;
    }

    @Override
    public CommonView createView() {
        return null;
    }

    @Override
    public CommonFragment createFragment() {
        return null;
    }

    @Override
    public void changePictureSuccess(PictureInfo pictureInfo) {

    }

    @Override
    public void init() {
        super.init();
        mNextButton.setVisibility(View.GONE);

        DriverInfo saveInfo = getSaveInfo();
        String drivertel = saveInfo.drivertel;
        Toast.makeText(getContext(), drivertel, Toast.LENGTH_SHORT).show();

    }

    @Override
    public void showDriverInfo(DriverInfo info) {
        remarkEditText.setContentText(info.remarks);
    }

    @Override
    public DriverInfo getSaveInfo() {
        String remark = remarkEditText.getContentText();
        mDriverInfo.remarks = remark;
        return mDriverInfo;
    }

    @Override
    public void saveInfoSuccess() {
        EventBusManage.refreshDriverList();
        finish();
    }

    @Override
    public void nextAudit() {
    }
}
